package org.xiaoxin.onecoupon.framework.idempotent;

import lombok.Getter;
import lombok.RequiredArgsConstructor;

import java.lang.ref.PhantomReference;
import java.util.Objects;

/**
 * 幂等状态枚举类
 * @author xiaoxin
 * 2025/5/9
 */
@RequiredArgsConstructor
public enum IdempotentMQConsumeStatusEnum {
   /**
    * 消费中
    */
   CONSUMING("0"),
   /**
    * 已消费
    */
   CONSUMED("1");
   @Getter
   private  final  String code;

   public   static  boolean isError(String consumeStatus){
      return Objects.equals(CONSUMING.code,consumeStatus);
   }

}
